<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/admin.css" />
<script type ="text/javascript">
	$(document).ready(function(){
	
		$(".minus").hide();
		$(".advanceSearchContent").hide();
		$(".advanceSearchLabel").click(function(){
			if($((".advanceSearchContent")).is(":visible")) {
				$(this).children(".minus").hide();
				$(this).children(".plus").show();
			}
			else {
				$(this).children(".plus").hide();
				$(this).children(".minus").show();
			}
			$(".advanceSearchContent").slideToggle("slow");
		});

		$("form").submit(function(){
			$.fn.yiiGridView.update('list-user', {
				data: $(this).serialize()
			});
			return false;
		});
	
	});

</script>


<div id='contentWrapper'>
	<div class = "advanceSearch">
		<?php $this->renderPartial('_search',array('model'=>$model))?>
	</div>



	<?php 
		$this->widget('zii.widgets.grid.CGridView', array(
			'id'=>'list-user',
	    	'dataProvider'=>$model->search(),
			'filter'=>$model,
			'selectableRows'=> 2,
			'columns'=>array(
				array(
					'header'=>'Check all',
					'class'=>'CCheckBoxColumn',
				),
				array(	
					'header'=>'STT',
					'value'=>'$row+1',
				),
				array(
					'header'=>'Tên',
					'class'=>'CLinkColumn',
					'labelExpression'=>'$data->user_status_user->user_name',
					'urlExpression'=>'Yii::app()->createUrl("/profile/experience/index/",array("uid"=>$data->user_status_user->user_id))',
				),
				array(
					'header'=>'Dự án gần đây',
					'type'=>'raw',
					'value'=>'CHtml::encode($data->user_status_user->getLastestProject())',
				),
				array(
					'header'=>'Trạng thái',
					'name'=>'user_status_idle',
					'filter'=>CHtml::dropDownList('UserStatus[user_status_idle]', NULL, UserStatus::getListStatus()),
					'value'=>'UserStatus::getStatus($data->user_status_idle)',
				),
				array(
					'header'=>'Thời gian rảnh',
					'name'=>'user_status_free_period',
					'value'=>'$data->user_status_free_period',
				),
				array(
					'header'=>'Giờ/ngày',
					'name'=>'user_hour_per_day',
					'value'=>'$data->user_hour_per_day',
				),
			),
			
		));
	?>

<div class ="buttonExport">
		<button type ="button" class ="bttExel"><a href ="#"></a></button>
		<button type ="button" class ="bttCSV"><a href ="#"></a></button>
		<button type ="button" class ="bttPDF"><a href ="#"></a></button>



</div>


</div>